<style lang='scss' scoped>
@import "@css/style.scss";
.login-page {
  position: absolute;
  height: 100%;
  width: 100%;
  background: #fff;
  &-content {
    height: 100%;
    width: 100%;
    &-login{
        margin-top: 40%;
    }
    &-register{
        font-size:$infoSize;
        color:#666;
        margin-top: $marginSize;
        padding: $marginSize;
        float: right;
    }
  }
}
</style>
<template>
  <div class="login-page">
    <navigation-bar
      :pageName="`登录`"
      @onLeftClick="$router.go(-1)"
    ></navigation-bar>
    <!-- 内容区域 -->
    <div class="login-page-content">
      <!-- 用户名 -->
      <div class="input-container">
        <input type="text" v-model="username" placeholder="用户名" />
      </div>
      <!-- 密码 -->
      <div class="input-container">
        <input type="password" v-model="password" placeholder="密码" />
      </div>

      <div class="login-page-content-login page-commit" @click="onLoginClick">
        登录
      </div>
      <a class="login-page-content-register" @click="onToRegisterClick">注册</a>
    </div>
  </div>
</template>
<script>
import NavigationBar from "../components/currency/NavigationBar.vue";
export default {
  components: {
    NavigationBar,
  },
  name: "login",
  data() {
    return {
      username: "",
      password: "",
    };
  },
  mounted() {
    this.init();
  },
  methods: {
    init() {},
    onLoginClick() {
      if (this.username.length === 0 || this.password.length === 0) {
        return;
      }
    },
    onToRegisterClick() {
      this.$router.push({
        name: "register",
        params: {
          routerType: "push",
        },
      });
    },
  },
  computed: {},
};
</script>